<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLabelTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('label', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->increments('id');
            $table->string('name',100)->unique()->index()->null()->default('')->comment('标签名称');
            $table->unsignedInteger('created_at')->null()->default('0')->comment('创建时间');
            $table->tinyInteger('content_type')->null()->default('0')->comment('标签类型 1文章 2标签 3亮点');
            $table->tinyInteger('status')->null()->default('0')->comment('标签状态 1为开启 2为关闭');

        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('label');
    }
}
